/**
 * Created by wenchuan.li on 2018/5/16.
 */
define(function () {

    var self,
        app = win.app,
        user
    ;

    var Me = app.Module.extend({

        init: function () {
            self = this;
            var sysuser=app.userInfos.sysUser;
            user = {
                GWAA001: "",
                GWAA004: "",
                GWAA005: "",
                GWAA006: "",
                GWAA007: "",
                GWAA008S: "",
                GWAA011: '',
                GWAA013: '',
                'GWAA03': sysuser.ACCOUNT,
                'GWAA02': sysuser.NAME,
                'useravatar': app.cookie('_WX_AVATAR_') || '../../../img/user.png',
            };
            self._super({}, win);
        },
        getGwaUser:function(){


            app.ajax({
                xurl: "api/wx/gwa/getGwaUser",
                cb: function (result) {
                    if (result.ok) {
                        app.extend(user, result.data.data);
                    }
                }
            });
        },
        _lazy: function () {
            this._super();

            mui('.mui-scroll-wrapper').scroll({
                deceleration: 0.0005
            });
        },
        _ready: function () {

            new Vue({
                el: app.getByid(doc, 'mainPage3'),
                data: {
                    item: user
                },
                methods: {}
            });

            self.getGwaUser();
        }
    });

    return new Me();

});